multiple_impute Subroutine

public subroutine multiple_impute(x, xc, nburn, maxiter, tol)

Generates multiple completed copies of a data set containing missing values by means of Bayesian data augmentation under a multivariate normal model with the noninformative Jeffreys prior.

The EM algorithm (em_impute) supplies the starting parameter estimates. Thereafter, each imputation is generated by alternating an imputation step, wherein the missing values are drawn from their conditional distribution given the observed values and the current parameters, with a posterior step, wherein new parameters are drawn from their posterior distribution given the completed data set.

The analyses of the resulting data sets may be combined by means of pool_imputations.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:,:) :: x

An N-by-M matrix containing N observations of M variables. Missing entries must be denoted by NaN's (see missing_value).

real(kind=real64), intent(out), dimension(:,:,:) :: xc

An N-by-M-by-K array where the K completed data sets will be written.

integer(kind=int32), intent(in), optional :: nburn

An optional input specifying the number of data augmentation cycles to perform between successive imputations. The default is 20.

integer(kind=int32), intent(in), optional :: maxiter

An optional input specifying the maximum number of EM iterations to allow when computing the starting estimates. The default is 500.

real(kind=real64), intent(in), optional :: tol

An optional input specifying the convergence tolerance used when computing the EM starting estimates. The default is 1.0e-8.